#!/bin/sh
#150410 1.3.4 stop wpa_supplicant and dhcpcd directly vs. using frisbee.sh.
#170412 1.4.3 ensure dhcpcd, wpa_supplicant & dialogs killed; move unrelated logic to frisbee (interface) script.
#170508 1.4.4 remove dialog kills - done elsewhere

if grep -q '^frisbee_mode=1' /etc/frisbee/frisbee.conf;then
	sed -i -e '/^frisbee_mode=/ s/=.*/=0/' /etc/frisbee/frisbee.conf
	wpa_cli terminate 2>/dev/null #150410
	dhcpcd -k #150410
	sleep 1 #170412...
	killall -9 dhcpcd 2>/dev/null
	killall wpa_cli 2>/dev/null
fi
